package com.happiness.system.config;

import com.happiness.gateway.config.swagger.SwaggerConfigAbstract;
import com.happiness.system.properties.SystemSwaggerProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import springfox.documentation.oas.annotations.EnableOpenApi;
import springfox.documentation.spring.web.plugins.Docket;

import javax.annotation.Resource;

@EnableOpenApi
@Configuration
public class SystemSwaggerConfig extends SwaggerConfigAbstract {

    @Resource
    private SystemSwaggerProperties swaggerProperties;

    @Override
    @Bean(name = "sysSwaggerConfig")
    public Docket createRestApi() {
        return createRestApi(swaggerProperties);
    }
}
